if trace1 is true then drag from oldPoint to newPoint
set the loc of button "electromagnet" to round(x),electroY
put newPoint into oldPoint
put timeElapsed+timeIncrement1 into timeElapsed
end repeat
choose browse tool
show menubar
put "Click on this field to restore the screen." into field "Blurb"
end runExperiment
on openCard
global cardClear1,dropHeight1
if (cardClear1 is true) and (item 2 of the loc of button "ball" <> (300-dropheight1)) then
put false into cardClear1
click at the loc of field "blurb"
end if
end openCard
-- part 3 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=3 top=83 right=117 bottom=37
-- title width / last selected line: 0
-- icon id / first selected line: 8499 / 8499
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Ball
-- part 4 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=11 top=57 right=85 bottom=29
-- title width / last selected line: 0
-- icon id / first selected line: 16003 / 16003
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Electromagnet
-- part 5 (field)
-- low flags: 81
-- high flags: 2004
-- rect: left=11 top=40 right=326 bottom=403
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 256
-- line height: 16
-- part name: Help
-- part 7 (button)
-- low flags: 00
-- high flags: A002
-- rect: left=16 top=319 right=340 bottom=76
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Return
----- HyperTalk script -----
on mouseUp
global ReturnCard
go ReturnCard
end mouseUp
-- part contents for background part 6
----- text -----
Press this field to begin tracing the path of the ball.
-- part contents for card part 5
----- text -----
In this experiment, a metal ball is suspended from an electromagnet which is moving sideways with a constant velocity. At a certain point, the electromagnet releases the ball, and it falls to earth in a parabola-shaped path.
This card simulates that experiment. It will compute and draw the path of the ball based on the parameters you can set by clicking on the "Set Parameters" button in the control panel. To begin the simulation, click on the field in the control panel which instructs you to do so, and follow any other instructions which appear there.
For a complete illustration of the experiment this card simulates, click on the "Experiment Video" button in the control panel, and then click on the first button in the list of selections which will appear.